using System;
using System.Threading.Tasks;
using NBModular.Module.WeChat.Application.WeChatUserService.ViewModels;
using NBModular.Module.WeChat.Domain.WeChat.Models;
using NBModular.Module.WeChat.Domain.WeChatUser.Models;

namespace NBModular.Module.WeChat.Application.WeChatUserService
{
    /// <summary>
    /// 微信用户信息服务
    /// </summary>
    public interface IWeChatUserService
    {
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<IResultModel> Query(WeChatUserQueryModel model);

        /// <summary>
        /// 创建
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<IResultModel> Add(WeChatUserAddModel model);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns></returns>
        Task<IResultModel> Delete(Guid id);

        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<IResultModel> Edit(Guid id);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<IResultModel> Update(WeChatUserUpdateModel model);

        /// <summary>
        /// 通过授权获取微信会员信息
        /// </summary>
        /// <param name="appid"></param>
        /// <param name="code"></param>
        /// <returns></returns>
        Task<IResultModel> GetUserInfoByAuthAsync(string appid, string code);

        /// <summary>
        /// 通过Openid获取微信会员信息
        /// </summary>
        /// <param name="openid"></param>
        /// <returns></returns>
        Task<IResultModel> GetUserInfoByOpenidAsync(string openid);

        /// <summary>
        /// 获取微信JS-SKD配置
        /// </summary>
        /// <param name="appId"></param>
        /// <param name="url"></param>
        /// <returns></returns>
        Task<IResultModel> GetWxConfigAsync(string appId, string url);
    }
}
